var heart1 = document.querySelector('.heart1'),
    reload = document.querySelector('.reload'),
    hearts = document.querySelector('.hearts'),
    allHearts = document.querySelectorAll('.hearts div'),
   heartAnime = document.querySelector('.heart.anime')
    

heart1.addEventListener('click', animation);

// reload.addEventListener('click', refresh)


function animation() {
   heart1.classList.add("active");
    reload.setAttribute("style", "opacity: 1; cursor: pointer; pointer-events: auto;  ");
   heartAnime.style.opacity = "0";

   allHearts.forEach(function(element) {
      element.classList.add("active");
   })
}



// function refresh() {
//   heart1.classList.remove("active");
//        reload.setAttribute("style", "opacity: 0; pointer-events: none;");
//    heartAnime.style.opacity = "1";;

//    allHearts.forEach(function(element) {
//       element.classList.remove("active");
//    })
   
// }